Skip to content

fix: sort new threads within project lists - #1777

Open
k9ight000 wants to merge 4 commits into
BigPizzaV3:mainfrom
k9ight000:codex/project-thread-pin-fix
Open

fix: sort new threads within project lists#1777
k9ight000 wants to merge 4 commits into
BigPizzaV3:mainfrom
k9ight000:codex/project-thread-pin-fix

Conversation

@k9ight000

Copy link
Copy Markdown

Problem

A newly created thread can temporarily use a client-new-thread id without a backend sort timestamp. CodexPlusPlus only corrected ordering in the top-level Chats list, so project thread lists could leave the new thread below older conversations until the temporary id settled or the app refreshed.

Fix

  • Give temporary client-new-thread rows a stable provisional timestamp.
  • Group visible sidebar rows by their actual Chats/project list and sort each list independently.
  • Continue preferring backend updated_at_ms values when available.
  • Batch /thread-sort-keys requests in groups of 200 for large sidebars.
  • Add injection-script regression coverage.

Validation

  • node --check assets/inject/renderer-inject.js
  • cargo test -p codex-plus-core --test cdp_bridge -j 1 — 95 passed
  • git diff --check

The published diff contains only the renderer injection script and its Rust regression test, and was scanned for credentials and local user paths.

@BigPizzaV3

Copy link
Copy Markdown
Owner

按每个 Chats/项目列表分别排序、为临时 client-new-thread 提供稳定时间戳的方向合理,但当前 renderer 注入脚本已在 main 继续演进,分支处于冲突状态,不能直接采用旧 DOM 选择器和整段排序逻辑。请 rebase 最新 main,确认不会跨列表移动节点,并补实际 DOM fixture 覆盖 Chats、两个项目列表、pin 和临时会话后重新跑注入测试。

@k9ight000
k9ight000 force-pushed the codex/project-thread-pin-fix branch from 2601891 to 65340ce Compare August 24, 2026 06:49
@BigPizzaV3

Copy link
Copy Markdown
Owner

main 已更新到 7385664。请基于当前 renderer rebase,避免沿用旧 DOM 结构;补 Chats、多个项目列表、projectless 列表及临时新会话 fixture,确认排序只在各自列表内进行、不跨列表移动节点。

@k9ight000
k9ight000 force-pushed the codex/project-thread-pin-fix branch from 65340ce to 12ceda6 Compare August 30, 2026 11:26
@BigPizzaV3

Copy link
Copy Markdown
Owner

请基于当前 main 的 renderer 结构重新确认并触发 CI,重点覆盖 Chats、多个项目列表、projectless 列表和 client-new-thread 临时 ID,确保排序只发生在各自列表内,不跨列表移动节点。

@BigPizzaV3

Copy link
Copy Markdown
Owner

该 PR 的核心提交 cc17c886 已经在当前 main 的 renderer 注入脚本中,项目线程排序功能已集成;分支当前与 main 冲突,因此关闭此重复 PR。

@BigPizzaV3 BigPizzaV3 closed this Sep 4, 2026
@BigPizzaV3 BigPizzaV3 reopened this Sep 4, 2026
@BigPizzaV3

Copy link
Copy Markdown
Owner

更正:刷新远端 main 后确认该修复尚未进入主线,已重新打开 PR。当前分支与 main 冲突,请 rebase 到最新 main,补跑三平台 CI,并验证 project 列表中新建会话排序和 Windows 资源换行兼容。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants